
\begin{tikzpicture}[scale=.8]
  \draw[gray, very thin] (0,0) grid (8,10);
  \draw[thick] (1,1) rectangle (7,9);
  \draw[thick] (1,7) -- (4,1) (7,9) -- (1,7) (7,9) -- (4,1);
  \foreach \x in {2,...,6} {
    \foreach \y in {2,...,8} { \fill[gray] (\x,\y) circle (3pt); }
  }
  \foreach \x/\y in {
      2/6,2/7,3/4,3/5,3/6,3/7,4/2,4/3,4/4,
      4/5,4/6,4/7,5/4,5/5,5/6,5/7,5/8,6/7,6/8}
    { \fill[red] (\x,\y) circle (3pt); }
  \foreach \x/\y in {2/5,3/3,4/8} { \fill[lime] (\x,\y) circle (3pt); }
  \foreach \x/\y in {1/7,4/1,7/9} { \fill[green] (\x,\y) circle (3pt); }
\end{tikzpicture}
